home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| C source text
| default
| |
99%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 6e 65 77 73 67 61 74 65 | 2e 6d 65 6c 70 61 72 2e |newsgate|.melpar.|
|00000030| 65 73 79 73 2e 63 6f 6d | 21 6e 65 77 73 0a 46 72 |esys.com|!news.Fr|
|00000040| 6f 6d 3a 20 46 72 65 64 | 20 4c 61 42 61 72 20 3c |om: Fred| LaBar <|
|00000050| 66 6c 61 62 61 72 40 6d | 65 6c 70 61 72 2e 65 73 |flabar@m|elpar.es|
|00000060| 79 73 2e 63 6f 6d 3e 0a | 53 75 62 6a 65 63 74 3a |ys.com>.|Subject:|
|00000070| 20 52 65 3a 20 41 6e 20 | 28 41 64 61 2d 73 74 79 | Re: An |(Ada-sty|
|00000080| 6c 65 29 20 65 6e 75 6d | 20 74 65 6d 70 6c 61 74 |le) enum| templat|
|00000090| 65 20 63 6c 61 73 73 3f | 3f 0a 58 2d 4d 61 69 6c |e class?|?.X-Mail|
|000000a0| 65 72 3a 20 4d 6f 7a 69 | 6c 6c 61 20 32 2e 30 20 |er: Mozi|lla 2.0 |
|000000b0| 28 58 31 31 3b 20 49 3b | 20 49 52 49 58 20 35 2e |(X11; I;| IRIX 5.|
|000000c0| 33 20 49 50 31 39 29 0a | 43 6f 6e 74 65 6e 74 2d |3 IP19).|Content-|
|000000d0| 54 79 70 65 3a 20 74 65 | 78 74 2f 70 6c 61 69 6e |Type: te|xt/plain|
|000000e0| 3b 20 63 68 61 72 73 65 | 74 3d 75 73 2d 61 73 63 |; charse|t=us-asc|
|000000f0| 69 69 0a 52 65 66 65 72 | 65 6e 63 65 73 3a 20 3c |ii.Refer|ences: <|
|00000100| 31 39 39 36 4d 61 72 38 | 2e 30 33 32 38 30 31 2e |1996Mar8|.032801.|
|00000110| 32 37 38 36 34 40 72 65 | 6c 61 79 2e 6e 73 77 63 |27864@re|lay.nswc|
|00000120| 2e 6e 61 76 79 2e 6d 69 | 6c 3e 0a 53 65 6e 64 65 |.navy.mi|l>.Sende|
|00000130| 72 3a 20 6e 65 77 73 40 | 6d 65 6c 70 61 72 2e 65 |r: news@|melpar.e|
|00000140| 73 79 73 2e 63 6f 6d 20 | 28 4d 65 6c 70 61 72 20 |sys.com |(Melpar |
|00000150| 4e 65 77 73 20 41 64 6d | 69 6e 69 73 74 72 61 74 |News Adm|inistrat|
|00000160| 6f 72 29 0a 4d 69 6d 65 | 2d 56 65 72 73 69 6f 6e |or).Mime|-Version|
|00000170| 3a 20 31 2e 30 0a 4f 72 | 67 61 6e 69 7a 61 74 69 |: 1.0.Or|ganizati|
|00000180| 6f 6e 3a 20 45 2d 53 79 | 73 74 65 6d 73 2c 20 4d |on: E-Sy|stems, M|
|00000190| 65 6c 70 61 72 20 44 69 | 76 0a 44 61 74 65 3a 20 |elpar Di|v.Date: |
|000001a0| 46 72 69 2c 20 38 20 4d | 61 72 20 31 39 39 36 20 |Fri, 8 M|ar 1996 |
|000001b0| 31 39 3a 35 36 3a 31 33 | 20 47 4d 54 0a 4d 65 73 |19:56:13| GMT.Mes|
|000001c0| 73 61 67 65 2d 49 44 3a | 20 3c 33 31 34 30 39 30 |sage-ID:| <314090|
|000001d0| 44 44 2e 35 39 45 32 40 | 6d 65 6c 70 61 72 2e 65 |DD.59E2@|melpar.e|
|000001e0| 73 79 73 2e 63 6f 6d 3e | 0a 43 6f 6e 74 65 6e 74 |sys.com>|.Content|
|000001f0| 2d 54 72 61 6e 73 66 65 | 72 2d 45 6e 63 6f 64 69 |-Transfe|r-Encodi|
|00000200| 6e 67 3a 20 37 62 69 74 | 0a 52 65 70 6c 79 2d 54 |ng: 7bit|.Reply-T|
|00000210| 6f 3a 20 66 6c 61 62 61 | 72 40 6d 65 6c 70 61 72 |o: flaba|r@melpar|
|00000220| 2e 65 73 79 73 2e 63 6f | 6d 2c 20 66 6c 61 62 61 |.esys.co|m, flaba|
|00000230| 72 40 76 61 69 73 2e 6e | 65 74 0a 43 63 3a 20 6a |r@vais.n|et.Cc: j|
|00000240| 70 65 74 65 72 73 6f 6e | 40 6d 65 6c 70 61 72 2e |peterson|@melpar.|
|00000250| 65 73 79 73 2e 63 6f 6d | 0a 0a 54 6f 6d 20 4d 63 |esys.com|..Tom Mc|
|00000260| 4c 69 6e 74 6f 63 6b 20 | 77 72 6f 74 65 3a 0a 3e |Lintock |wrote:.>|
|00000270| 20 0a 3e 20 48 61 73 20 | 61 6e 79 6f 6e 65 20 6d | .> Has |anyone m|
|00000280| 61 64 65 20 61 20 67 65 | 6e 65 72 61 6c 2d 70 75 |ade a ge|neral-pu|
|00000290| 72 70 6f 73 65 2c 20 70 | 6f 77 65 72 66 75 6c 20 |rpose, p|owerful |
|000002a0| 65 6e 75 6d 20 22 63 6f | 6e 74 61 69 6e 65 72 22 |enum "co|ntainer"|
|000002b0| 20 63 6c 61 73 73 3f 20 | 20 54 68 69 73 20 77 6f | class? | This wo|
|000002c0| 75 6c 64 0a 3e 20 63 72 | 65 61 74 65 20 61 20 63 |uld.> cr|eate a c|
|000002d0| 6c 61 73 73 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 |lass con|taining |
|000002e0| 66 75 6c 6c 20 66 75 6e | 63 74 69 6f 6e 61 6c 69 |full fun|ctionali|
|000002f0| 74 79 20 66 6f 72 20 61 | 6e 20 65 6e 75 6d 20 79 |ty for a|n enum y|
|00000300| 6f 75 20 67 69 76 65 20 | 69 74 2c 20 6f 72 20 61 |ou give |it, or a|
|00000310| 20 6c 69 73 74 0a 3e 20 | 6f 66 20 65 6e 75 6d 20 | list.> |of enum |
|00000320| 76 61 6c 75 65 73 20 79 | 6f 75 20 67 69 76 65 20 |values y|ou give |
|00000330| 69 74 2e 20 20 57 69 74 | 68 20 61 20 76 61 72 69 |it. Wit|h a vari|
|00000340| 61 62 6c 65 20 6f 66 20 | 73 75 63 68 20 61 20 22 |able of |such a "|
|00000350| 74 79 70 65 22 2c 20 79 | 6f 75 20 63 6f 75 6c 64 |type", y|ou could|
|00000360| 0a 3e 20 0a 3e 20 2d 20 | 72 65 61 64 20 61 6e 20 |.> .> - |read an |
|00000370| 65 6e 75 6d 20 76 61 6c | 75 65 20 66 72 6f 6d 20 |enum val|ue from |
|00000380| 61 20 74 65 78 74 20 66 | 69 6c 65 20 69 6e 74 6f |a text f|ile into|
|00000390| 20 74 68 65 20 76 61 72 | 69 61 62 6c 65 20 61 6e | the var|iable an|
|000003a0| 64 20 77 72 69 74 65 20 | 69 74 73 20 76 61 6c 75 |d write |its valu|
|000003b0| 65 20 74 6f 0a 3e 20 20 | 20 74 68 65 20 73 63 72 |e to.> | the scr|
|000003c0| 65 65 6e 20 28 6e 6f 74 | 20 6a 75 73 74 20 69 74 |een (not| just it|
|000003d0| 73 20 6e 75 6d 65 72 69 | 63 20 69 6e 74 2d 76 61 |s numeri|c int-va|
|000003e0| 6c 75 65 2c 20 62 75 74 | 20 61 20 73 74 72 69 6e |lue, but| a strin|
|000003f0| 67 20 72 65 70 72 65 73 | 65 6e 74 61 74 69 6f 6e |g repres|entation|
|00000400| 20 6f 66 0a 3e 20 74 68 | 65 0a 3e 20 20 20 76 61 | of.> th|e.> va|
|00000410| 6c 75 65 27 73 20 6e 61 | 6d 65 29 0a 3e 20 0a 3e |lue's na|me).> .>|
|00000420| 20 2d 20 69 6e 63 72 65 | 6d 65 6e 74 20 61 6e 64 | - incre|ment and|
|00000430| 20 64 65 63 72 65 6d 65 | 6e 74 20 74 68 65 20 76 | decreme|nt the v|
|00000440| 61 72 69 61 62 6c 65 20 | 77 69 74 68 20 2b 2b 20 |ariable |with ++ |
|00000450| 61 6e 64 20 2d 2d 2c 20 | 61 6e 64 20 74 68 72 6f |and --, |and thro|
|00000460| 77 20 61 6e 20 65 78 63 | 65 70 74 69 6f 6e 0a 3e |w an exc|eption.>|
|00000470| 20 20 20 77 68 65 6e 20 | 79 6f 75 20 67 6f 20 6f | when |you go o|
|00000480| 66 66 20 6f 6e 65 20 65 | 6e 64 20 6f 66 20 74 68 |ff one e|nd of th|
|00000490| 65 20 65 6e 75 6d 65 72 | 61 74 65 64 20 76 61 6c |e enumer|ated val|
|000004a0| 75 65 73 0a 3e 20 0a 3e | 20 2d 20 67 65 74 20 74 |ues.> .>| - get t|
|000004b0| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 65 6e 75 |he numbe|r of enu|
|000004c0| 6d 20 76 61 6c 75 65 73 | 20 73 6f 20 79 6f 75 20 |m values| so you |
|000004d0| 63 61 6e 2c 20 73 61 79 | 2c 20 64 65 66 69 6e 65 |can, say|, define|
|000004e0| 20 61 6e 20 61 72 72 61 | 79 20 69 6e 64 65 78 65 | an arra|y indexe|
|000004f0| 64 20 62 79 0a 3e 20 20 | 20 74 68 65 20 65 6e 75 |d by.> | the enu|
|00000500| 6d 20 63 6c 61 73 73 0a | 3e 20 0a 3e 20 2d 20 61 |m class.|> .> - a|
|00000510| 64 64 20 76 61 6c 75 65 | 73 20 74 6f 20 74 68 65 |dd value|s to the|
|00000520| 20 65 6e 75 6d 20 63 6c | 61 73 73 20 77 68 65 6e | enum cl|ass when|
|00000530| 20 64 65 72 69 76 69 6e | 67 20 61 20 6e 65 77 20 | derivin|g a new |
|00000540| 63 6c 61 73 73 20 66 72 | 6f 6d 20 74 68 65 20 62 |class fr|om the b|
|00000550| 61 73 65 20 65 6e 75 6d | 0a 3e 20 20 20 63 6c 61 |ase enum|.> cla|
|00000560| 73 73 0a 0a 69 66 20 61 | 6e 79 6f 6e 65 20 77 61 |ss..if a|nyone wa|
|00000570| 6e 74 73 20 74 6f 20 67 | 65 74 20 74 6f 67 65 74 |nts to g|et toget|
|00000580| 68 65 72 20 61 6e 64 20 | 74 72 79 20 74 6f 20 63 |her and |try to c|
|00000590| 72 65 61 74 65 20 73 75 | 63 68 20 61 20 74 68 69 |reate su|ch a thi|
|000005a0| 6e 67 20 49 20 77 6f 75 | 6c 64 20 62 65 20 77 69 |ng I wou|ld be wi|
|000005b0| 6c 6c 69 6e 67 20 74 6f | 20 62 65 20 61 20 6d 65 |lling to| be a me|
|000005c0| 6d 62 65 72 20 6f 66 20 | 74 68 65 0a 65 66 66 6f |mber of |the.effo|
|000005d0| 72 74 2e 20 45 73 70 65 | 63 69 61 6c 6c 79 20 69 |rt. Espe|cially i|
|000005e0| 6e 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 3a |n the fo|llowing:|
|000005f0| 0a 0a 73 74 72 75 63 74 | 20 42 61 73 65 0a 7b 20 |..struct| Base.{ |
|00000600| 20 0a 20 20 65 6e 75 6d | 20 45 72 72 6f 72 54 79 | . enum| ErrorTy|
|00000610| 70 65 20 7b 20 4f 4b 2c | 20 52 44 5f 45 52 52 4f |pe { OK,| RD_ERRO|
|00000620| 52 2c 20 57 52 5f 45 52 | 52 4f 52 20 7d 3b 0a 20 |R, WR_ER|ROR };. |
|00000630| 20 45 72 72 6f 72 54 79 | 70 65 20 45 72 72 6f 72 | ErrorTy|pe Error|
|00000640| 52 65 74 46 75 6e 63 31 | 28 29 20 7b 20 72 65 74 |RetFunc1|() { ret|
|00000650| 75 72 6e 20 4f 4b 3b 20 | 7d 0a 7d 3b 0a 0a 73 74 |urn OK; |}.};..st|
|00000660| 72 75 63 74 20 44 65 72 | 3a 20 70 75 62 6c 69 63 |ruct Der|: public|
|00000670| 20 42 61 73 65 0a 7b 0a | 20 20 20 65 6e 75 6d 20 | Base.{.| enum |
|00000680| 45 72 72 6f 72 54 79 70 | 65 20 7b 20 4e 65 77 5f |ErrorTyp|e { New_|
|00000690| 45 52 52 4f 52 20 7d 3b | 0a 20 20 20 45 72 72 6f |ERROR };|. Erro|
|000006a0| 72 54 79 70 65 20 45 72 | 72 6f 72 52 65 74 46 75 |rType Er|rorRetFu|
|000006b0| 6e 63 32 28 29 20 7b 20 | 72 65 74 75 72 6e 20 4e |nc2() { |return N|
|000006c0| 65 77 5f 45 52 52 4f 52 | 3b 20 7d 0a 7d 0a 0a 6d |ew_ERROR|; }.}..m|
|000006d0| 61 69 6e 28 29 0a 7b 0a | 20 44 65 72 20 64 3b 0a |ain().{.| Der d;.|
|000006e0| 20 44 65 72 3a 3a 45 72 | 72 6f 72 54 79 70 65 20 | Der::Er|rorType |
|000006f0| 65 20 3d 20 64 2e 45 72 | 72 6f 72 52 65 74 46 75 |e = d.Er|rorRetFu|
|00000700| 6e 63 31 28 29 3b 0a 7d | 0a 0a 77 69 6c 6c 20 67 |nc1();.}|..will g|
|00000710| 69 76 65 20 61 20 63 6f | 6d 70 69 6c 65 72 20 65 |ive a co|mpiler e|
|00000720| 72 72 6f 72 2e 20 20 56 | 65 72 79 20 6c 61 6d 65 |rror. V|ery lame|
|00000730| 20 61 6e 64 20 63 72 61 | 70 70 79 21 0a 0a 44 6f | and cra|ppy!..Do|
|00000740| 65 73 20 61 6e 79 6f 6e | 65 20 68 61 76 65 20 61 |es anyon|e have a|
|00000750| 20 76 69 61 62 6c 65 20 | 61 70 70 72 6f 61 63 68 | viable |approach|
|00000760| 20 74 6f 20 74 68 69 73 | 20 76 65 72 79 20 73 74 | to this| very st|
|00000770| 61 6e 64 61 72 64 20 70 | 72 6f 62 6c 65 6d 3f 3f |andard p|roblem??|
|00000780| 3f 0a 0a 2d 2d 20 0a 2d | 2d 2d 2d 2d 2d 2d 2d 2d |?..-- .-|--------|
|00000790| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000007a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000007b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000007c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 20 22 36 |--------|----. "6|
|000007d0| 34 30 4b 20 6f 75 67 68 | 74 20 74 6f 20 62 65 20 |40K ough|t to be |
|000007e0| 65 6e 6f 75 67 68 20 66 | 6f 72 20 61 6e 79 62 6f |enough f|or anybo|
|000007f0| 64 79 2e 22 0a 20 20 20 | 20 20 20 2d 2d 20 42 69 |dy.". | -- Bi|
|00000800| 6c 6c 20 47 61 74 65 73 | 2c 20 31 39 38 31 0a |ll Gates|, 1981. |
+--------+-------------------------+-------------------------+--------+--------+